package ui.datagrid
{
	import common.cache.DepCache;
	import common.cache.StaffCache;
	import common.model.WqDepInfo;
	import common.model.WqStaffInfo;
	
	import mx.collections.ArrayCollection;
	
	import spark.components.gridClasses.GridColumn;
	
	public class DepGridColumn extends GridColumn
	{
		public var filed:String = 'depId';
		
		protected function getDepLabelFunction(item:Object,column:GridColumn):String{
			var str:String ="";
			if(item.hasOwnProperty(filed)){
				var temp :WqDepInfo =DepCache.depMap[item[filed]];
				if(temp){
					str = temp.name;
				}
			}
			return str;
		}
		
		public function DepGridColumn(columnName:String=null)
		{
			super(columnName);
			this.labelFunction = getDepLabelFunction;
			this.headerText = "部门";
		}
	}
}